import Axios from "/src/Api/Axios"
enum api {
    carList = '/mall-api/cart/getCartList',
    isChecked = '/mall-api/cart/checkAllCart',
    isCheckedOne = '/mall-api/cart/checkCart',
    setNum = '/mall-api/cart/addToCart',
    delOne = '/mall-api/cart/delete',
    clear = '/mall-api/cart/clear'
}
export function getCarList (){
    return Axios({
        url:api.carList
    })
}

export function isChecked (isChecked){
    return Axios({
        url:`${api.isChecked}/${isChecked}`
    })
}
export function isCheckedOne (isChecked,id){
    return Axios({
        url:`${api.isCheckedOne}/${id}/${isChecked}`
    })
}

export function setNum (count,id){
    return Axios({
        url:`${api.setNum}/${id}/${count}`
    })
}

export function delOne(id){
    return Axios({
        url:`${api.delOne}/${id}`
    })
}

export function clear(){
    return Axios({
        url:api.clear
    })
}


